Creating Service Operations Classes
Service operation classes are classes that provide the mechanism to call operations to the Cobra Web Service. In the Cobra Web Service ClientAPI, related operations are grouped into separate service operation classes.
There are three service operations classes available in the current release of the Cobra Web Service.
- ProjectOperations class: The ProjectOperation class provides mechanism to perform project-related operations. Some of the operations available are Advance Calendar, Calculate Forecast, and Calculate Progress.
- Integration class: The Integration class provides mechanism to perform integration, such as Integrate Actual Costs.
- ProcessLogOperations class: The ProcessLogOperation class provides mechanism to retrieve process log files.
To create an instance of the service operation class, you must call the CreateServiceOperations<TServiceOperations>() method in the instance of CobraServices class. Below is a sample script:
// Create an instance of ProjectOperations class.
ProjectOperations projOps = cobraServices.CreateServiceOperations<ProjectOperations>();
// Create an instance of Integration class.
Integration integration = cobraServices.CreateServiceOperations<Integration>();
// Create an instance of ProcessLogOperations class.
ProcessLogOperations processLogOps = cobraServices.CreateServiceOperations<ProcessLogOperations>();